package com.autumn.config.api.dto.input;

import com.autumn.validation.constraints.NotNullOrBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 应用信息连接输入
 * 
 * @author 老码农
 *         <p>
 *         Description
 *         </p>
 * @date 2017-12-31 15:44:08
 */
public class ApplicationConnectionInput extends ConfigureInput {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4917256120589107645L;

	@NotNull(message = "应用 id 不能为空")
	private Long appId;
	@NotNull(message = "连接 id 不能为空")
	private Long connectionId;
	@NotNullOrBlank(message = "连接标识不能为空。")
	@Size(max = 50, min = 1, message = "连接标识太长，长度不能超过50。")
	private String identity;
	private boolean isDefault;
	
	private Long id;

	/**
	 * 获取Id
	 * 
	 * @return
	 */
	public Long getId() {
		return id;
	}

	/**
	 * 设置id
	 * 
	 * @param id
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * 获取 app id
	 * 
	 * @return
	 */
	public Long getAppId() {
		return appId;
	}

	/**
	 * 设置 app id
	 * 
	 * @param appId
	 *            应用Id
	 */
	public void setAppId(Long appId) {
		this.appId = appId;
	}

	public Long getConnectionId() {
		return connectionId;
	}

	public void setConnectionId(Long connectionId) {
		this.connectionId = connectionId;
	}

	public String getIdentity() {
		return identity;
	}

	public void setIdentity(String identity) {
		this.identity = identity;
	}

	public boolean getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(boolean isDefault) {
		this.isDefault = isDefault;
	}

}
